#define _HEADER_WaterSys_H

#ifndef _HEADER_WaterTank0_H
#include "WaterTank0.h"
#endif
#ifndef _HEADER_WaterTank1_H
#include "WaterTank1.h"
#endif

struct WaterSysConfig
{
    int waterTank0_outPump_port;
    int waterTank0_waterLine_port;
    int waterTank0_waterSwitchOut_port;
    int waterTank0_waterSwitchIn_port;

    int waterTank1_outPump_port;
    int waterTank1_waterLine_port;
};

class WaterSys{
public:
    //自来水罐、雨水罐
    WaterTank0 water0;
    WaterTank1 water1;
    //是否就绪状态
    bool isReadyState = false;
public:
     //初始化
    void init(WaterSysConfig* inConfig);
    //打开供水系统
    void open();
    //关闭供水系统
    void close();

    //供水系统自动任务：保持自来水罐满水状态
    void autoWork();
    //供水系统是否就绪
    bool isReady();
    //打印
    void toString(char* inStr);
};
